package cn.com.api.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import cn.com.api.entity.U_cate;
import cn.com.api.mapper.base.U_cateMapperBase;
import cn.com.util.PageInfo;

//DAO
public interface U_cateMapper extends U_cateMapperBase {

	// 查看数据集
	@Select("SELECT * FROM  U_cate where cate_type=0 and parent_id = #{parent_id} order by parent_id,id")
	public List<U_cate> findU_catesOrderByParentId(Integer parent_id);

	// 查询分类信息
	public List<U_cate> getArticleCates(@Param("parentid") Integer parentid, @Param("userid") Integer userid);

	// 获取文章目录的前10个作为我的频道中默认分类
	public List<U_cate> getArticleCatesListPage(@Param("page") PageInfo page);
}
